// pages/order/order.js
Page({
  data: {
    orders: [],
    activeIndex: 0
  },
  onLoad: function() {
    const orders = wx.getStorageSync('orders') || [];
    this.setData({
      orders: orders
    });
  },
  onBarItemTap: function(e) {

    const index = e.currentTarget.dataset.index;

    this.setData({
      activeIndex: index
    });
  }
});